﻿<Controls:MetroWindow x:Class="MyMediaPlayer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        Title="Meepo Player"
                      Height="506" Width="900"
                      MinHeight="506"
                      MinWidth="900"
                      WindowStartupLocation="CenterScreen"
                      BorderBrush="{DynamicResource AccentColorBrush}"
                      WindowTransitionsEnabled="True"
                      EnableDWMDropShadow="False"
                      Icon=".\R\Headphone_Icon.png"
                      Loaded="MetroWindow_Loaded"
                      AllowsTransparency="True"
                      AllowDrop="True"
                      Drop="MetroWindow_Drop"
                      >
    <Window.Resources>
        <SolidColorBrush x:Key="TransparentBlue" Color="#F7F7F7" Opacity="0.4" />
    </Window.Resources>
    <!--Right WindowCommand-->
    <Controls:MetroWindow.RightWindowCommands>
        <Controls:WindowCommands>
            
            <Button Name="btnRepeat" Click="btnRepeat_Click">
                <StackPanel>
                    <Image Name="imgBtnRepeat" Source=".\R\appbar.repeat.Non.png"/>
                </StackPanel>
            </Button>
            
            <Button Name="btnPrevouis" Click="btnPrevouis_Click">
                <StackPanel>
                    <Image Source=".\R\appbar.control.Pre.png" Stretch="None"/>
                </StackPanel>
            </Button>
            <Button Name="btnBackward" Click="btnBackward_Click">
                <StackPanel>
                    <Image Source=".\R\appbar.control.rewind.png" Stretch="None"/>
                </StackPanel>
            </Button>
            <Button Name="btnStop" Click="btnStop_Click">
                <StackPanel>
                    <Image Source=".\R\Stop.png" Stretch="None"/>
                </StackPanel>
            </Button>
            <Button Name="btnPlay" Click="btnPlay_Click">
                <StackPanel>
                    <Image Name="imgBtnPlay" Source=".\R\appbar.control.png" Stretch="None"/>
                </StackPanel>
            </Button>
            <Button Name="btnForward" Click="btnForward_Click">
                <StackPanel>
                    <Image Source=".\R\appbar.control.fastforward.png" Stretch="None"/>
                </StackPanel>
            </Button>
            <Button Name="btnNext" Click="btnNext_Click">
                <StackPanel>
                    <Image Source=".\R\appbar.control.Next.png" Stretch="None"/>
                </StackPanel>
            </Button>
        </Controls:WindowCommands>
    </Controls:MetroWindow.RightWindowCommands>
    <!--Left WindowCommand-->
    
    <Controls:MetroWindow.LeftWindowCommands>
        <Controls:WindowCommands>
            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">

                <Button Name="btnPreperence" Click="btnPreperence_Click">
                    <StackPanel>
                        <Image Source=".\R\settings.png" Stretch="None"/>
                    </StackPanel>
                </Button>
                
                <Button Name="btnBrowse" Click="btnBrowse_Click">
                    <StackPanel>
                        <Image Source=".\R\appbar.folder.open.png" Stretch="None"/>
                    </StackPanel>
                </Button>
                <Button Name="btnAbout" Click="btnAbout_Click">
                    <StackPanel>
                        <Image Source=".\R\Question.png" Stretch="None"/>
                    </StackPanel>
                </Button>
            </StackPanel>
        </Controls:WindowCommands>
    </Controls:MetroWindow.LeftWindowCommands>
    
    <!--Content-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        
        <MediaElement Name="player" Grid.Row="0"   Loaded="player_Loaded" LoadedBehavior="Manual" UnloadedBehavior="Close" Stretch="Fill" MediaEnded="player_MediaEnded" MediaOpened="player_MediaOpened" MouseMove="player_MouseMove" MouseDown="player_MouseDown">
            
        </MediaElement>
        <Border Grid.Row="0" BorderThickness="0" BorderBrush="{DynamicResource AccentColorBrush}" CornerRadius="20" ClipToBounds="False" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Border.Effect>
                <DropShadowEffect ShadowDepth="8" BlurRadius="15" Direction="320" Opacity="0.8"/>
            </Border.Effect>
            <StackPanel Grid.Row="0" Name="stcList_Back" Width="250" MaxWidth="250" HorizontalAlignment="Left"  Orientation="Vertical" VerticalAlignment="Top" Visibility="Hidden" Margin="10,10,0,0"  Background="{StaticResource TransparentBlue}">
                <Button Name="btnClearAll" Background="{DynamicResource AccentColorBrush}" Click="btnClearAll_Click">CLEAR ALL</Button>
                <ScrollViewer Name="scrList" VerticalScrollBarVisibility="Visible" Width="250"  CanContentScroll="True" Margin="8,15,0,0"  HorizontalAlignment="Left" Opacity="1.0" VerticalAlignment="Center" Foreground="Red">
                    
                    <StackPanel Name="stcList" HorizontalAlignment="Left" Orientation="Vertical" VerticalAlignment="Center" Visibility="Visible" Opacity="1.0" CanVerticallyScroll="True">
                        
                    </StackPanel>
                </ScrollViewer>
            
            </StackPanel>
        </Border>
        
        <StackPanel Name="stcright" Grid.Row="0" HorizontalAlignment="Right" Orientation="Vertical" VerticalAlignment="Center"  Visibility="Hidden" Margin="0,0,40,0">
            <Border Grid.Row="0" BorderThickness="0" BorderBrush="{DynamicResource AccentColorBrush}" CornerRadius="15" ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top">
                <Border.Effect>
                    <DropShadowEffect ShadowDepth="7" BlurRadius="12" Direction="270" Opacity="0.8"/>
                </Border.Effect>
                <Slider Name="sldVolume"   Maximum="100" Minimum="0" ValueChanged="sldVolume_ValueChanged" Visibility="Hidden"  Height="400" Margin="0,10,2,0" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource FlatSlider}" MouseWheel="sldVolume_MouseWheel"/>
            </Border>
            <Label Name="lblVolume" Visibility="Hidden" HorizontalAlignment="Right" Margin="0,0,0,0"></Label>
        </StackPanel>

        <StackPanel Name="stcPlayerPosition" Visibility="Hidden" Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Background="{StaticResource TransparentBlue}" Margin="0,0,0,40">
            <Border Grid.Row="0" BorderThickness="0" BorderBrush="{DynamicResource AccentColorBrush}" CornerRadius="15" ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top">
                <Border.Effect>
                    <DropShadowEffect ShadowDepth="5" BlurRadius="12" Direction="0" Opacity="0.8"/>
                </Border.Effect>
                <Slider Name="sldPlayerTime" Style="{DynamicResource FlatSlider}" Margin="0,0,0,0" Minimum="0" PreviewMouseLeftButtonDown="sldPlayerTime_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="sldPlayerTime_PreviewMouseLeftButtonUp" MouseWheel="sldPlayerTime_MouseWheel" LargeChange="10" SmallChange="5"></Slider>
            </Border>
        </StackPanel>
        
    </Grid>
</Controls:MetroWindow>
